package cn.tedu.log.controller;

import cn.tedu.log.pojo.dto.LogListDTO;
import cn.tedu.log.pojo.vo.LogPageListVO;
import cn.tedu.log.service.LogService;
import cn.tedu.log.utils.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/v1/log")
@Slf4j
@Api(tags = "操作日志")
public class LogController {
    @Autowired
    private LogService logService;

    @ApiOperation("分页列表")
    @GetMapping("list")
    public JsonResult list(LogListDTO logListDTO) {
        LogPageListVO list = logService.selectPage(logListDTO);
        return JsonResult.ok(list);
    }
}
